# -*- coding: utf-8 -*-

from odoo import models, fields


class BasicInfo(models.Model):
    _name = 'basic_diabetes_info'
    _description = '糖尿病首诊表'

    phrId = fields.Char(string="健康档案号", required=True)
    checkId = fields.Char(string="条码编号", required=True)
    resident_id = fields.Many2one("basic_info", ondelete='set null', string="居民ID", index=True)
    visitDate = fields.Date(string="随访日期", default=fields.Date.today())
    fas_bd_glu_mg = fields.Float(string='空腹血糖mg/dL')
    pos_bd_glu_mg = fields.Float(string='餐后血糖mg/dL')
    nerv_system = fields.Char(string="神经系统")
    height = fields.Float(string='身高')
    weight = fields.Float(string='体重')
    referral = fields.Char(string="转诊")

    createUser = fields.Char(string="建档人")
    createDate = fields.Date(string="建档日期", default=fields.Date.today())
    createUnit = fields.Char(string="建档机构")
    update_time = fields.Date(string="更新时间", default=fields.Date.today())
    is_delete = fields.Selection([
        ('0', '否'),
        ('1', '是')],
        string="是否删除")

    flup_doc = fields.Char(string="随访医生")
    followup_nurse = fields.Char(string="随访护士")
    doc_opin = fields.Char(string="医生意见")
    tcm_diag = fields.Char(string="中医诊断")
    west_medic_diag = fields.Char(string="西医诊断")
    key_poin_pub_o = fields.Char(string="宣传要点其他")
    guid_prog_o = fields.Char(string="指导方案其他")
    expe_med_hyper_of_liver_y = fields.Char(string="经验用药-肝阳上亢")
    expe_med_defic_of_qi_b = fields.Char(string="经验用药-气血两虚")
    expe_med_kid_ess_def = fields.Char(string="经验用药-肾精不足")
    expe_med_phl_ret = fields.Char(string="经验用药-痰浊中阻")
    main_narrin = fields.Char(string="主述")
    past_hist = fields.Char(string="既往史")
    mod_state = fields.Char(string="修改状态")
